<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="author" content="lcx">
    <script src="jquery-3.1.1.js"></script>
    <title>图片翻转</title>
    <style>
        * {
            box-sizing: border-box
        }
        
        header {
            width: 400px;
            height: 40px;
            text-align: center;
            line-height: 40px;
            border-bottom: 2px solid black;
        }
        
        #box {
            width: 402px;
            height: 480px;
            margin: 0 auto;
            border: 1px solid #ccc;
            background-color: white;
        }
        
        ul,
        li {
            margin: 0;
            padding: 0;
            list-style: none;
        }
        
        ul li img {
            width: 100%;
            border: 1px solid #ccc;
        }
        
        #box ul {
            margin-left: 20px;
            margin-top: 10px;
        }
        
        #box ul li {
            float: left;
            width: 148px;
            height: 95px;
            margin: 5px 15px;
            position: relative;
            cursor: pointer;
        }
        
        #box ul li .overlay {
            position: absolute;
            top: 0px;
            left: 0px;
            background-color: orange;
            text-align: center;
            width: 148px;
            height: 95px;
            line-height: 95px;
            color: white;
            display: none;
        }
    </style>
</head>

<body>
    <div id="box">
        <header>热门品牌推荐</header>
        <ul>
            <li>
                <div class="overlay">肌龄</div>
                <img src="images/11.jpg" alt="">
            </li>
            <li>
                <div class="overlay">肌龄</div>
                <img src="images/22.jpg" alt="">
            </li>
            <li>
                <div class="overlay">肌龄</div>
                <img src="images/33.jpg" alt="">
            </li>
            <li>
                <div class="overlay">肌龄</div>
                <img src="images/44.jpg" alt="">
            </li>
            <li>
                <div class="overlay">肌龄</div>
                <img src="images/55.jpg" alt=""></li>
            <li>
                <div class="overlay">肌龄</div>
                <img src="images/66.jpg" alt=""></li>
            <li>
                <div class="overlay">肌龄</div>
                <img src="images/77.jpg" alt="">
            </li>
            <li>
                <div class="overlay">肌龄</div>
                <img src="images/88.jpg" alt="">
            </li>
        </ul>

    </div>
</body>

</html>